package com.wiscamp.ninechapters.accounts.domain.models;

import cube.ddd.domain.Entity;
import lombok.Data;

import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.Collection;

/**
 * 账户日志
 */
@Data
public class AccountLog implements Entity {
    private static final long serialVersionUID = 1L;

    /**
     * 账户日志
     */
    private long logId = 0;
    /**
     * 账户编号
     */
    private long accountId = 0;
    /**
     * 账户类型
     */
    private int accountType = 0;
    /**
     * 用户编号
     */
    private long userId = 0;
    /**
     * 是否批次管理
     */
    private boolean batchManagement = false;
    /**
     * 借贷类型
     */
    private int debitCreditType = 0;
    /**
     * 期初余额
     */
    private BigDecimal beginningBalance = new BigDecimal(0);
    /**
     * 借方发生额
     */
    private BigDecimal debitAmount = new BigDecimal(0);
    /**
     * 贷方发生额
     */
    private BigDecimal creditAmount = new BigDecimal(0);
    /**
     * 期末余额
     */
    private BigDecimal closingBalance = new BigDecimal(0);
    /**
     * 关联类型
     */
    private int referenceType = 0;
    /**
     * 关联编号
     */
    private long referenceId = 0;
    /**
     * 关联备注
     */
    private String referenceRemark = "";
    /**
     * 创建时间
     */
    private LocalDateTime createTime;
    /**
     * 变更时间
     */
    private LocalDateTime editTime;
    /**
     * 操作人
     */
    private long operateUser = 0;
    /**
     * 备注
     */
    private String remark = "";

    /**
     * 账号批次日志列表
     */
    private Collection<AccountBatchLog> accountBatchLogs = new ArrayList<>();
}